// default package
// Generated 28 Jul, 2014 8:04:07 PM by Hibernate Tools 3.4.0.CR1
package com.galaxy.bean;

import java.math.BigDecimal;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.UniqueConstraint;

/**
 * SalesBestsellersAggregatedYearly generated by hbm2java
 */
@Entity
@Table(name = "sales_bestsellers_aggregated_yearly", catalog = "magento", uniqueConstraints = @UniqueConstraint(columnNames = {
		"period", "store_id", "product_id" }))
public class SalesBestsellersAggregatedYearly implements java.io.Serializable {

	private Integer id;
	private CoreStore coreStore;
	private CatalogProductEntity catalogProductEntity;
	private Date period;
	private String productName;
	private BigDecimal productPrice;
	private BigDecimal qtyOrdered;
	private short ratingPos;

	public SalesBestsellersAggregatedYearly() {
	}

	public SalesBestsellersAggregatedYearly(BigDecimal productPrice,
			BigDecimal qtyOrdered, short ratingPos) {
		this.productPrice = productPrice;
		this.qtyOrdered = qtyOrdered;
		this.ratingPos = ratingPos;
	}

	public SalesBestsellersAggregatedYearly(CoreStore coreStore,
			CatalogProductEntity catalogProductEntity, Date period,
			String productName, BigDecimal productPrice, BigDecimal qtyOrdered,
			short ratingPos) {
		this.coreStore = coreStore;
		this.catalogProductEntity = catalogProductEntity;
		this.period = period;
		this.productName = productName;
		this.productPrice = productPrice;
		this.qtyOrdered = qtyOrdered;
		this.ratingPos = ratingPos;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "store_id")
	public CoreStore getCoreStore() {
		return this.coreStore;
	}

	public void setCoreStore(CoreStore coreStore) {
		this.coreStore = coreStore;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "product_id")
	public CatalogProductEntity getCatalogProductEntity() {
		return this.catalogProductEntity;
	}

	public void setCatalogProductEntity(
			CatalogProductEntity catalogProductEntity) {
		this.catalogProductEntity = catalogProductEntity;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "period", length = 10)
	public Date getPeriod() {
		return this.period;
	}

	public void setPeriod(Date period) {
		this.period = period;
	}

	@Column(name = "product_name")
	public String getProductName() {
		return this.productName;
	}

	public void setProductName(String productName) {
		this.productName = productName;
	}

	@Column(name = "product_price", nullable = false, precision = 12, scale = 4)
	public BigDecimal getProductPrice() {
		return this.productPrice;
	}

	public void setProductPrice(BigDecimal productPrice) {
		this.productPrice = productPrice;
	}

	@Column(name = "qty_ordered", nullable = false, precision = 12, scale = 4)
	public BigDecimal getQtyOrdered() {
		return this.qtyOrdered;
	}

	public void setQtyOrdered(BigDecimal qtyOrdered) {
		this.qtyOrdered = qtyOrdered;
	}

	@Column(name = "rating_pos", nullable = false)
	public short getRatingPos() {
		return this.ratingPos;
	}

	public void setRatingPos(short ratingPos) {
		this.ratingPos = ratingPos;
	}

}
